package me.yxy.mobanddd.components.config;

import lombok.val;
import me.yxy.mobanddd.components.filter.ResponseFormatFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//@Configuration
public class FilterConfigueraton {

//    @Bean
    public FilterRegistrationBean tokenFilterRegistration()
    {

        val registration = new FilterRegistrationBean();
        registration.setFilter(new ResponseFormatFilter());
        registration.addUrlPatterns("/query/*");
        registration.setName("tokenFilter");
        registration.setOrder(1);
        return registration;
    }
}
